<template>
	<div style="padding:0px;">
		<el-form :model="dialogForm"  ref="dialogForm" :rules="rules" :label-width="formLabelWidth">
			<el-tabs v-model="activeName" type="card" >
				<el-tab-pane label="图片信息" name="1">
			    	<el-form-item label="上游购销合同" >
				      	 <qiniu :qiniuImage="qiniuImage"  :packJson="packJson" :id="qiniuImage.id" :canDelete="false"></qiniu>
				    </el-form-item>
				    <el-form-item label="定金凭证" >
				     <qiniu  :qiniuImage="qiniuImage1"  :packJson="packJson" :id="qiniuImage1.id" :canDelete="false"></qiniu>
				    </el-form-item>
				    <el-form-item label="供应商收款账号" >
				     <qiniu  :qiniuImage="qiniuImage2"  :packJson="packJson" :id="qiniuImage2.id" :canDelete="false"></qiniu>
				    </el-form-item>
				    <el-form-item label="提车地址及联系人"  >
				      <qiniu  :qiniuImage="qiniuImage3"  :packJson="packJson1" :id="qiniuImage3.id" :canDelete="false"></qiniu>
				    </el-form-item>
				    <el-form-item label="补充图片"  >
				    <qiniu   :qiniuImage="qiniuImage6" :id="qiniuImage6.id" :canDelete="false"></qiniu>
				    </el-form-item>
                    
                     <el-form-item label="付款通知书"  >
			         <qiniu  :qiniuImage="qiniuImage8" :id="qiniuImage8.id" :canDelete="false"></qiniu>
			        </el-form-item>

			    </el-tab-pane>
			    <el-tab-pane label="基本信息" name="2">
			    	<el-form-item label="订单号"  class="half">
				      <el-input  v-model="dialogForm.orderNumber" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="申请时间"  class="half">
				      <el-input  v-model="dialogForm.addTime" auto-complete="off" disabled ></el-input>
				    </el-form-item>
                    <el-form-item label="订单类型"  class="half">             
				    	<el-select 
		                    	v-model="dialogForm.type" 
		                    	placeholder="请选择订单类型"  
		                    	disabled
		                    	>
		                  <el-option  label="请选择订单类型" value="" >
                         </el-option>
	                     <el-option v-for="(item, index) in orderType" :label="item" :value="index-0" :key="index">
                         </el-option>
					    </el-select>    
				    </el-form-item>
				    <el-form-item label="业务员"   class="half"> 
				    	<el-select 
		                    	v-model="dialogForm.businessSysUsersId" 
		                    	placeholder="请选择业务员"  
		                    	disabled
		                    	>
                        <el-option  label="请选择业务员" value="" >
                        </el-option>
					       <el-option    
                                v-for="(item,index) in yewuyuan"  
                                :label="item.realname"  
                                :value="item.id"   
                                :key="index"
                                >  
	                       </el-option>  
					    </el-select>    
				    </el-form-item>
                    <el-form-item label="经销商名称"  >
				      <el-input  v-model="dialogForm.dealerName" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="汽车车型" >
				      <el-input  v-model="dialogForm.carBrandNameAndCarName" auto-complete="off" disabled ></el-input>
				    </el-form-item>
                    <el-form-item label="汽车数量"  class="half">
				      <el-input  v-model="dialogForm.amount" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="汽车颜色"  class="half">
				      <el-input  v-model="dialogForm.color" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="指导价/配置" >
				      <el-input  type="textarea" :rows=3 v-model="dialogForm.carConfig" auto-complete="off" disabled ></el-input>
				    </el-form-item>
                    <el-form-item label="购车总价格"  class="currency">
				      <el-input  :value="dialogForm.totalPrice|toFixed2" auto-complete="off" disabled ></el-input>
				      <span class="convertCurrency">{{dialogForm.totalPrice|convertCurrency}}</span>
				    </el-form-item>
				    <el-form-item label="垫资金额"  class="currency">
				      <el-input  :value="dialogForm.paymentAmount|toFixed2" auto-complete="off" disabled ></el-input>
				      <span class="convertCurrency" >{{dialogForm.paymentAmount|convertCurrency}}</span>  
				    </el-form-item>
				    <el-form-item label="定金金额"  class="currency">
				      <el-input  :value="dialogForm.earnest|toFixed2" auto-complete="off" disabled 
				      ></el-input>
				      <span class="convertCurrency">{{dialogForm.earnest|convertCurrency}}</span>
				    </el-form-item>
				     <el-form-item label="保证金金额"  class="currency">
				      <el-input  :value="dialogForm.deposit|toFixed2" auto-complete="off" disabled ></el-input>
				      <span class="convertCurrency">{{dialogForm.deposit|convertCurrency}}</span>
				    </el-form-item>
				    <el-form-item label="垫资比例"  class="half" prop="earnest">
				    	<el-input type="text" :value="(((dialogForm.paymentAmount-0)/(dialogForm.totalPrice-0)*100).toFixed(2))+'%'"  min="0" max="99999999" auto-complete="off" disabled></el-input>
				    </el-form-item>

				    <el-form-item label="当前利率"  class="half">
				      <el-input :value="(dialogForm.interestRate-0).toFixed(4)" auto-complete="off" disabled ></el-input>
				    </el-form-item>  
				    <el-form-item label="借款时长"  prop="durationId"  class="half"> 
				    	<el-select  
		                    	v-model="dialogForm.durationId" 
		                    	placeholder="请选择借款时长"
		                        disabled   
		                    	>
                            <el-option    
                                v-for="(item,index) in dialogForm.carOrderDurationList"  
                                :label="item.description"  
                                :value="item.id"   
                                :key="index"
                                >  
                            </el-option>
					    </el-select> 
				    </el-form-item>
                    <el-form-item label="地推员"  class="half"> 
				    	<el-select 
		                    	v-model="dialogForm.pushSysUsersId" 
		                    	placeholder="请选择地推员"  
		                    	disabled
		                    	>
                        </el-option>
					       <el-option    
                                v-for="(item,index) in ditui"  
                                :label="item.realname"  
                                :value="item.id"   
                                :key="index"
                                >  
	                       </el-option>  
					    </el-select>    
				    </el-form-item>
                   
                    <el-form-item label="价格审核备注"  >
				      <el-input  type="textarea" :rows=3 v-model="dialogForm.priceRemark" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="资金方"  > 
				    	<el-select 
		                    	v-model.number="dialogForm.funderId" 
		                    	placeholder="请选择资金方"  
		                    	disabled
		                    	>
                        </el-option> 	
					       <el-option    
                                v-for="(item,index) in selectFunder"  
                                :label="item.realname"  
                                :value="item.id"   
                                :key="index"
                                >  
	                       </el-option>  
					    </el-select>    
				    </el-form-item>

				    <el-form-item label="SPV"  > 
				    	<el-input  :value="selectSpvUser.realname" auto-complete="off" disabled ></el-input>
				    	<!-- <el-select 
				    	    		                    	v-model.number="dialogForm.spvId" 
				    	    		                    	placeholder="请选择SPV"  
				    	    		                    	disabled    
				    	    		                    	>      
				    	    					       <el-option     
				    	                                    :label="selectSpvUser.realname"  
				    	                                    :value="selectSpvUser.id"   
				    	                                    >  
				    	    	                       </el-option>  
				    	    					    </el-select>  -->    
				    </el-form-item>
				    <el-form-item label="补充说明"  >
				      <el-input  type="textarea" :rows=3 v-model="dialogForm.supplementExplain" auto-complete="off" disabled ></el-input>
				    </el-form-item>
			    </el-tab-pane>
			    <el-tab-pane label="上游供应商信息" name="3">
			    	<el-form-item label="合同上游名称" >
				      <el-input  v-model="dialogForm.supplierName" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				  	
				    <el-form-item label="提车详细地址" >
				      <el-input  :value="dialogForm.supplierProvince+dialogForm.supplierCity+dialogForm.supplierAddress" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				  	<el-form-item label="提车联系人" >
				      <el-input  v-model="dialogForm.supplierPerson" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="联系人手机号" >
				      <el-input  v-model="dialogForm.supplierPhone" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="收款帐户名1" >
				      <el-input  v-model="dialogForm.accountName" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="开户行名称1" >
				      <el-input  v-model="dialogForm.openningBank" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				  	<el-form-item label="收款账号1" >
				      <el-input  v-model="dialogForm.accountNumber" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    
				    <el-form-item label="收款账户名2"  >
				      <el-input    v-model="dialogForm.accountNameBak" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="开户行名称2"  > 
				      <el-input   v-model="dialogForm.openningBankBak" auto-complete="off" disabled ></el-input>
				    </el-form-item>
			    	<el-form-item label="收款账号2"  >
				      <el-input    v-model="dialogForm.accountNumberBak" auto-complete="off" disabled></el-input>
				    </el-form-item>
				    
				   
				  	<el-form-item label="打款备注" >
				      <el-input type="textarea" :rows=3 v-model="dialogForm.remark" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    
			    </el-tab-pane>
			    <el-tab-pane label="初审结果" name="4">
			    	<el-form-item label="上游购销合同审核结果"  >
				      <el-input   :maxlength="50"  v-model="dialogForm.orderAuditResults.upperReacherExamineResult" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				     <el-form-item label="定金凭证审核结果"  >
				      <el-input  :maxlength="50"  v-model="dialogForm.orderAuditResults.earnestExamineResult" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				     <el-form-item label="供应商名称"  >
				      <el-input  :maxlength="50" v-model="dialogForm.orderAuditResults.supplierEstablishName" auto-complete="off" disabled ></el-input>
				    </el-form-item> 
				     <el-form-item label="供应商成立日期"  >
				     	<el-input  :value="dialogForm.orderAuditResults.supplierEstablishTime|parseTime('{y}-{m}-{d}')" auto-complete="off" disabled ></el-input>
				     	
				     	
				      <!-- <el-input  v-model="dialogForm.orderAuditResults.supplierEstablishTime" auto-complete="off" disabled ></el-input> -->
				    </el-form-item>
				     <el-form-item label="供应商审核结果"  >
				      <el-input  :maxlength="50"  v-model="dialogForm.orderAuditResults.establishExamineResult" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				     <el-form-item label="供应商资质图片"  >
				     	<qiniu  :qiniuImage="qiniuImage4"  :packJson="packJson2" :id="qiniuImage4.id" :canDelete="false"></qiniu>
				    </el-form-item>
				     <el-form-item label="资源商名称"  >
				      <el-input  :maxlength="50"  v-model="dialogForm.orderAuditResults.resourceProviderName" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				     <el-form-item label="资源商成立日期"  >
				     	
				       <el-input  :value="dialogForm.orderAuditResults.resourceProviderEstablishTime|parseTime('{y}-{m}-{d}')" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				     <el-form-item label="资源商审核结果"  >
				      <el-input   :maxlength="50" v-model="dialogForm.orderAuditResults.resourceProviderExamineResult" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				     <el-form-item label="资源商资质图片"  >
				     	<qiniu  :qiniuImage="qiniuImage5"  :packJson="packJson2" :id="qiniuImage5.id" :canDelete="false"></qiniu>
				    </el-form-item>
				    
				    <el-form-item label="提车地址审核结果"   >
				      <el-input  :maxlength="50"  v-model="dialogForm.orderAuditResults.carAddressExamineResult" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="审核结果"  >
				      <el-input  :maxlength="100"  type="textarea" :rows=3 v-model="dialogForm.dataChangeRecord" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				  	<el-form-item label="审核人员"  class="half" >
				      <el-input  v-model="dialogForm.orderAuditResults.firstExamineResultName" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				    <el-form-item label="审核时间"  class="half" >
				      <el-input  v-model="dialogForm.orderAuditResults.firstExamineResultTime" auto-complete="off" disabled ></el-input>
				    </el-form-item>

			    </el-tab-pane>
			    <el-tab-pane label="二审审核结果" name="5">
			    	<el-form-item label="车辆资料相关证明(打款证明)"  :class="this.dialogForm.status==30?'is-required':''">
				   	   <qiniu  :qiniuImage="qiniuImage7"  :packJson="packJson1" :id="qiniuImage7.id" :canDelete="isAdd.bool"></qiniu> 
				    </el-form-item>
				 
				    <el-form-item label="车辆相关信息审核结果"  prop="orderAuditResults.carInformationExamineResult" :rules="this.dialogForm.status!=20?rules['orderAuditResults.carInformationExamineResult']:[{ required: false }]">
				      <el-input  :maxlength="50" v-model="dialogForm.orderAuditResults.carInformationExamineResult" auto-complete="off"    :disabled="!isAdd.bool"></el-input>
				    </el-form-item>
				    <el-form-item label="预计手续寄送日期"   prop="orderAuditResults.proceduresSendTime" :rules="this.dialogForm.status!=20?rules['orderAuditResults.proceduresSendTime']:[{ required: false }]">
				      
				        <el-date-picker :editable="false" style="width:100%;"

					      v-model="dialogForm.orderAuditResults.proceduresSendTime"
					      type="date"
					      placeholder="选择日期"
					      :disabled="!isAdd.bool"
					      :picker-options="proceduresSendTime"
					    >
					    </el-date-picker>
				    </el-form-item>
				    <el-form-item label="钥匙数量"  prop="orderAuditResults.keyCount" :rules="this.dialogForm.status!=20?rules['orderAuditResults.keyCount']:[{ required: false }]">
				      <el-input type="tel" :maxlength="9"  v-model.number="dialogForm.orderAuditResults.keyCount" auto-complete="off" :disabled="!isAdd.bool"> </el-input>
				    </el-form-item>
				    <el-form-item label="具体钥匙情况"  prop="orderAuditResults.keySituation" :rules="this.dialogForm.status!=20?rules['orderAuditResults.keySituation']:[{ required: false }]">
				      <el-input :maxlength="50" v-model="dialogForm.orderAuditResults.keySituation" auto-complete="off" :disabled="!isAdd.bool" ></el-input>
				    </el-form-item>
				    <el-form-item label="审核信息"   class="is-required">
				      <el-radio-group v-model="dialogForm.status" :disabled="!isAdd.bool">
					      <el-radio :label="30"  >审核通过</el-radio>
					      <el-radio :label="20"  >审核不通过</el-radio>
					   </el-radio-group>
				    </el-form-item>
				    <el-form-item label="审核结果"  ><!-- prop="secondReviewRemark" -->
				      <el-input :maxlength="100" type="textarea" :rows=3 v-model="dialogForm.secondReviewRemark" auto-complete="off" :disabled="!isAdd.bool" ></el-input>
				    </el-form-item>
				    <el-form-item label="审核人员" >
				      <el-input v-model="dialogForm.orderAuditResults.secondExamineResultName" auto-complete="off" disabled ></el-input>
				    </el-form-item>
				  	<el-form-item label="审核时间"  >
				      <el-input  v-model="dialogForm.orderAuditResults.secondExamineResultTime" auto-complete="off" disabled ></el-input>
				    </el-form-item>
			    </el-tab-pane> 
			    
			</el-tabs>
			<div style="text-align:right;margin-top:15px;">
				 <el-button @click="returnBack">返 回</el-button>
				 <el-button  v-if="isAdd.bool&&activeName==5" type="primary" @click="submitConfirmForm('dialogForm')">提 交</el-button>
			</div>
		</el-form>
	</div>
</template>

<script  th:inline="javascript">
    import qiniu from '@/views/qiniu/upload';
    import agentHttp from '@/utils/agentHttp.js';
     import {require,prop,phone,decimalTwo,decimalFour,isChinese,length30,length100,decimal,max100,maxTenInt} from '@/utils/rules.js';
	export default{
		created(){
           this.queryAuditOrderInfo();
        },
		props:['dialogFormVisible','query','isAdd','tableData',"carOrderId"],
		components:{qiniu},
		data(){
			return{
				proceduresSendTime: {
		          disabledDate(time) {
		            return time.getTime() < Date.now() - 8.64e7
		          }
		        },
				formLabelWidth:'170px',
				//弹窗或者查看页面信息
		        dialogForm:{
		         paymentAmount:'',
		         orderNumber:"",
 			     selectFunder:"",
 			     supplierName:"",
		         orderAuditResults:{proceduresSendTime:""},
						imagUrl:[],
						imagUrl1:[],
						imagUrl2:[],
						imagUrl3:[],
						imagUrl4:[],
						imagUrl5:[],
						imagUrl6:[],
						imagUrl7:[],
						imagUrl8:[],
		        },
		        //资金方
			    selectFunder:[],
				//spv
				selectSpvUser:{},
				orderType:{},
				yewuyuan:{},
				ditui:{},
		        rules: {
		           'orderAuditResults.carInformationExamineResult': [require('车辆相关信息审核结果',{trigger: "blur"})],
		           'orderAuditResults.proceduresSendTime': [require('预计手续寄送日期',{trigger: "blur",type:"date"})],
		           'orderAuditResults.keyCount':[require('钥匙数量',{trigger:"blur",type:"number"}),{validator: maxTenInt, trigger: "blur"}],
		           'orderAuditResults.keySituation':[require('具体钥匙情况',{trigger:"blur"})],
		           'secondReviewRemark':[require('审核结果',{trigger:"blur"})],
		        },
		        dialogImageUrl:"",
		        dialogVisible:false,
		        activeShow:false,
		        activeName:"5",
		          //七牛图片上传
			        qiniuImage:{
			        	id:"qiniuImage", //图片预览的id   
			        	image_uri:[],    //图片上传的列表  只含有url地址
			        },
			        
			        qiniuImage1:{
			        	id:"qiniuImage1",    
			        	image_uri:[]
			        },
			        
			        qiniuImage2:{
			        	id:"qiniuImage2",    
			        	image_uri:[]
			        },
			        
			        qiniuImage3:{
			        	id:"qiniuImage3",    
			        	image_uri:[]
			        },
			        
			        qiniuImage4:{
			        	id:"qiniuImage4",    
			        	image_uri:[]
			        },
			        qiniuImage5:{
			        	id:"qiniuImage5",    
			        	image_uri:[]
			        },
			        qiniuImage6:{
			        	id:"qiniuImage6",    
			        	image_uri:[]
			        },
			         qiniuImage7:{
			        	id:"qiniuImage7",    
			        	image_uri:[]
			        },
			         qiniuImage8:{
			        	id:"qiniuImage8",    
			        	image_uri:[]
			        },
			        packJson:{
						maxLength:6,   //最大图片数量
						accept:"",//image/gif,image/jpeg,image/jpg,image/png如果是这些，可以不传此参数
						size:4    //图片大小  单位兆
					},
			        
			        packJson1:{
						maxLength:3,   
						accept:"",
						size:4    
					},
			        packJson2:{
						maxLength:10,   
						accept:"",
						size:4    
					}
			}
		},
		methods:{
			returnBack(){
				this.dialogFormVisible.bool=false;
			},
			submitConfirmForm(formName){
                this.$refs[formName].validate((valid) => {
		          if (valid) {
		          		this.submitOrder();
		          } else {
		           this.$nextTick(()=>{

		          	   this.$message.warning(document.getElementsByClassName('el-form-item__error')[0].innerText);
		               return false;
		            })
		          }
		        });
			},
           //获取订单数据
		    queryAuditOrderInfo(){  
			  agentHttp.get('adminApi/admin/car_order/second_audit_order/view/'+this.carOrderId).then((data)=>{
		            if(data.success){  
		    
		              this.dialogForm =  data.data.orderInfo;  
		              //资金方
		              this.selectFunder = data.data.funderUser;

		              if(this.dialogForm.orderAuditResults == null){
		              	 this.dialogForm.orderAuditResults = {proceduresSendTime:""}; 
		              }else{
		              	this.dialogForm.orderAuditResults.examineAptitudePic?this.qiniuImage4.image_uri=this.dialogForm.orderAuditResults.examineAptitudePic.split(',').notempty():"";
		            	this.dialogForm.orderAuditResults.resourceProviderPic?this.qiniuImage5.image_uri=this.dialogForm.orderAuditResults.resourceProviderPic.split(',').notempty():"";
		            	this.dialogForm.orderAuditResults.carInformationPic?this.qiniuImage7.image_uri=this.dialogForm.orderAuditResults.carInformationPic.split(',').notempty():"";
		                this.dialogForm.orderAuditResults.paymentNoticePic?this.qiniuImage8.image_uri=this.dialogForm.orderAuditResults.paymentNoticePic.split(',').notempty():"";
		              }     
		              //初始化业务员
		              this.yewuyuan=data.data.yewuyuan;
		              //初始化地推人员 
		              this.ditui= data.data.ditui;
		              //初始化订单类型
		              this.orderType= data.data.orderType;
		             
		              //加载图片
		                this.dialogForm.contracts?this.qiniuImage.image_uri= this.dialogForm.contracts.split(',').notempty():"";
		            	this.dialogForm.depositPic?this.qiniuImage1.image_uri= this.dialogForm.depositPic.split(',').notempty():"";
		            	this.dialogForm.supplierInfoPic?this.qiniuImage2.image_uri= this.dialogForm.supplierInfoPic.split(',').notempty():"";
		            	this.dialogForm.supplierAddressPic?this.qiniuImage3.image_uri= this.dialogForm.supplierAddressPic.split(',').notempty():"";
		            	this.dialogForm.supplementPic?this.qiniuImage6.image_uri= this.dialogForm.supplementPic.split(',').notempty():"";
		            	this.getSpvUser();
		            	
                        this.dialogForm.orderAuditResults.carInformationExamineResult=this.dialogForm.orderAuditResults.carInformationExamineResult==null?"确认无误":this.dialogForm.orderAuditResults.carInformationExamineResult; 


		            	if(this.isAdd.bool){
		            		this.dialogForm.status=30;

		            	}
		            	this.dialogForm.orderAuditResults.proceduresSendTime?this.dialogForm.orderAuditResults.proceduresSendTime=new Date(this.dialogForm.orderAuditResults.proceduresSendTime):this.dialogForm.orderAuditResults.proceduresSendTime="";
		            	this.FormatTwo('totalPrice');
		            	this.FormatTwo('paymentAmount');
		            	this.FormatTwo('earnest');
		            	this.FormatTwo('deposit');
		            	this.FormatInterestRate('interestRate');
		            } 
		        })
		    	 
		    },
		    submitOrder(){	
               if (this.setImageUrl()) {
				agentHttp.postJson('adminApi/admin/car_order/second_audit_order/temporary_submit',this.dialogForm).then((data)=>{
		            if(data.success){  
		            	this.$emit('refreshTableData');
		            	this.dialogFormVisible.bool=false; 
		            	this.$message.success(data.data||"暂存成功");
		            } 
		        }) 
			}
		},
          setImageUrl(){
               this.dialogForm.orderAuditResults.carInformationPic=this.qiniuImage7.image_uri.join(",");
               	if(this.dialogForm.orderAuditResults.carInformationPic.length<1&&this.dialogForm.status==30){
               		this.$message.warning('车辆资料相关证明图片至少一张');
		            return false;
               	}
                return true;
                
		    },

		     //spv
		    getSpvUser(){   
		    	for (var i = 0; i < this.selectFunder.length; i++) {
		    		if( this.selectFunder[i].id == this.dialogForm.funderId ){  
		    			if(null != this.selectFunder[i].spv){
		    				this.selectSpvUser = this.selectFunder[i].spv;   
		    				this.dialogForm.spvId = parseInt(this.selectFunder[i].spv.id);
		    				return ;
		    			}else {
		    				this.dialogForm.spvId=null;
		    				this.selectSpvUser ={};
		    			}
		    		}else{
		    			    this.dialogForm.spvId=null;
		    				this.selectSpvUser ={};
		    		}  
		    	} 
			},
			 FormatTwo(val){
                this.dialogForm[val] = (this.dialogForm[val]-0).toFixed(2);
		    },
		     FormatInterestRate(val){
                this.dialogForm[val] = (this.dialogForm[val]-0).toFixed(4);
		    }

		}
	};
</script>
